<?php // echo CHtml::errorSummary($model); ?>
<div style="clear: both;">
    <?php echo CHtml::beginForm('', 'post', array('class' => 'dot_form fw_60', 'enctype'=>'multipart/form-data')); ?>
    <fieldset>
        <legend><?php echo Yii::t('common', 'please_fill_table_contents'); ?></legend>
        <dl>
            <dt><?php echo CHtml::activeLabelEx($model, 'node_id'); ?></dt>
            <dd>
                <?php
                echo CHtml::activeDropDownList($model, 'node_id',
                    CHtml::listData(Node::getCurrentLevelNodes(), 'id', 'name')
                );
                ?>
                <?php echo CHtml::activeLabelEx($model, 'is_recommend'); ?>
                <?php echo CHtml::activeCheckBox($model, 'is_recommend', array('class' => 'checkbox')); ?>
                <?php echo CHtml::activeLabelEx($model, 'is_picking'); ?>
                <?php echo CHtml::activeCheckBox($model, 'is_picking', array('class' => 'checkbox')); ?>
            </dd>

            <dt><?php echo CHtml::activeLabelEx($model, 'name'); ?></dt>
            <dd>
                <div>
                <?php
                echo CHtml::activeTextField($model, 'name',array(
                    'maxlength' => 200,
                    'class' => 'large'
                ));
                ?>
                </div>
                <div>
                    <?php echo CHtml::error($model, 'name'); ?>
                </div>
            </dd>
            <dt><?php echo CHtml::activeLabelEx($model, 'summary'); ?></dt>
            <dd>
                <div style="width: 850px; overflow:auto;">
                    <?php
                    $this->widget('application.extensions.ckeditor.CKEditor', array(
                        'model' => $model,
                        'attribute' => 'summary',
                        'language' => 'zh_cn',
                        'editorTemplate' => 'full',
                    )); ?>
                </div>
                <div><?php echo CHtml::error($model, 'summary'); ?></div>
            </dd>

            <dt><?php echo CHtml::activeLabelEx($model, 'order_pos'); ?></dt>
            <dd>
                <div>
                    <?php
                    echo CHtml::activeTextField($model, 'order_pos');
                    echo CHtml::activeLabelEx($model, 'status');
                    echo CHtml::activeDropDownList($model, 'status', Options::statusOptions());
                    ?>
                </div>
                <div><?php echo CHtml::error($model, 'order_pos'); ?></div>
            </dd>

            <dt></dt>
            <dd>
                <?php
                echo CHtml::submitButton($model->isNewRecord
                    ? Yii::t('common', 'create') : Yii::t('common', 'update'), array(
                    'class' => 'btn'
                ));
                ?>
            </dd>
        </dl>
    </fieldset>
    <?php echo CHtml::endForm(); ?>
</div>